# 加载代码
path = File.dirname(__FILE__).force_encoding('utf-8')
files = [
 File.join(path, 'chen_RebarTools_SS/rectPipePillar.rb'),
 File.join(path, 'chen_RebarTools_SS/countWeight.rb'),
 File.join(path, 'chen_RebarTools_SS/hSteel.rb'),
 File.join(path, 'chen_RebarTools_SS/xSteel.rb'),
 File.join(path, 'chen_RebarTools_SS/circlePipePillar.rb')
 #File.join(path, 'chen_RebarTools/elbowRebar.rb')
]
files.each{|file|
 next unless File.file?(file)
 load file
}

# 新增工具条
menu = UI.menu('Extensions')
toolbar = UI::Toolbar.new "钢构——钢之术士工具条"


cmd = UI::Command.new("create_rectPipePillar"){
    create_Rect_PipePillar
}
cmd.large_icon = cmd.small_icon = "chen_RebarTools_SS/image/rectPipePillar.png"
cmd.tooltip = "创建方管柱"
cmd.status_bar_text = "这是创建方管柱的插件按钮"
toolbar.add_item cmd

cmd = UI::Command.new("create_hSteel"){
    create_H_Steel
}
cmd.large_icon = cmd.small_icon = "chen_RebarTools_SS/image/hSteel.png"
cmd.tooltip = "创建H型钢"
cmd.status_bar_text = "这是创建H型钢的插件按钮"
toolbar.add_item cmd


cmd = UI::Command.new("create_xSteel"){
    create_X_Steel
}
cmd.large_icon = cmd.small_icon = "chen_RebarTools_SS/image/xSteel.png"
cmd.tooltip = "创建X型钢"
cmd.status_bar_text = "这是创建X型钢的插件按钮"
toolbar.add_item cmd

cmd = UI::Command.new("create_circlePipePillar"){
    create_Circle_PipePillar
}
cmd.large_icon = cmd.small_icon = "chen_RebarTools_SS/image/circlePipePillar.png"
cmd.tooltip = "创建圆管柱"
cmd.status_bar_text = "这是创建圆管柱的插件按钮"
toolbar.add_item cmd


cmd = UI::Command.new("count_Weight"){
    count_Weight
}
cmd.large_icon = cmd.small_icon = "chen_RebarTools_SS/image/countWeight.png"
cmd.tooltip = "统计方管柱"
cmd.status_bar_text = "这是统计方管柱的插件按钮"
toolbar.add_item cmd

toolbar.show
#menu.add_item cmd
